Ravi Bhavnani, Nina Schlager, Mirko Reul and Karsten Donnay (2023). Household trajectories of resilience to acute malnutrition in the Kenyan drylands, Frontiers in Sustainable Food Systems, 10.3389/fsufs.2023.1091346

Data availability statement:
This repository provides the data used in the referred article. The data are provided, wherever applicable in final processed form, original sources for (raw) data are provided in this documentation. Restrictions only apply to the availability of child anthropometric information and household characteristics in order to safeguard privacy. We provided fully anonymised information only for the select household characteristics used in this study. 

Index of data provided:

1. Data preparation and resilience calculation: child anthropometric information

helper_packages_load.R provides a list of packages
helper_functions.R summarises some custom functions needed to run the analysis 

1.1 Geo-coding of wards
We draw on publicly available data from GADM (www.gadm.org) to obtain ward level shape files for Kenya. We compare ward-names provided by the NDMA in MUAC_all.csv with those featured in shape files from the GADM project. We list differences in geocoding_wardnames_all.txt  and construct an adapted shape file, called KEN_adm3-ndma.shp. The data are provided as .zip archives that contain all relevant  shape file information. helper_functions_geocoding.R includes a function to check the number of misspecified observations in a data frame.

List of files:
	MUAC_all.csv
	gadm36_KEN_shp.zip
	KEN_adm3-ndma.shp
	geocoding_wardnames_all.txt 
	helper_functions_geocoding.R

List of related figures:
	Figure 1. Map of 141 arid and semi-arid study sites in Kenya.

1.2 Ward resilience calculation
We calculate ward resilience (r_adm3) on the basis of monthly anthropometric data, in particular the Mid-Upper Arm Circumference (MUAC), of individual children in 141 wards between 2016 and 2020. This data draws on detailed longitudinal child anthropometric information collected on a monthly basis by the National Drought Management  Authority of Kenya (NDMA). The MUAC data provided in MUAC_all.csv are fully anonymised. 

List of related figures:
	Figure 2. Resilience trajectories per ward assigned using a latent mixed class mixed model (left) vs. average resilience for the period between 2016 and 2020 (right), with smaller values indicating lower resilience. Blue dots display the mean proportion of malnourished children [“Global acute malnutrition (GAM)” prevalence] relative to the population size per ward for the same period.

1.3 County-level stressor intensity
We include information on climate, conflict and food price stressor intensity at the county-month-level. The climate data are based on NASA NDVI measurement. We specifically use the MOD13A3 v006 data available at https://lpdaac.usgs.gov/products/mod13a3v006/  and calculated spatially averaged monthly NDVI indicators for each of the counties in our sample. Information regarding market price developments for 1kg maize are provided by the NDMA via expert interviews. We calculate monthly deviation rates from a three-year average and categorise each month as stressed or not where stressor intensity is defined as the mean price increase above the long-term average. Lastly, to account for the intensity of conflict, we draw on the Uppsala Conflict Data Program’s Georeferenced Events Dataset (Sundberg and Melander, 2013). Individual stressor dynamics are provided as .RData files.

List of files:
	"kenya_markets_monthadm1.RData"
	"kenya_conflict_monthadm1.RData"
	"kenya_climate_monthadm1.RData"

List of related figures:
	Figure 3. Observed trajectories of ward resilience to acute malnutrition at monthly intervals. Mean trajectories derived from a four-class latent class mixed model are smoothed using a generalised additive model and are depicted including the 0.95 confidence interval (top), Kenya stressor intensity (bottom).

2. Time-to-event analysis: longitudinal household surveys

To perform the cox regression analysis, we provide the following variables:

	— time:		number of survey months 
	— AMN_dummy: 	binary variable indicating that a household is malnourished, i.e. if min 1 observation is MUAC < 125mm
	— status: 		categorical variable indicating household switches from normal nutrition to undernourished and vice versa 
	— switch_below:     binary variable indicating that a household becomes malnourished at time t
	— switch_recover:   binary variable indicating that a household recovers from malnutrition at time t
	— status:		categorical variable indicating the nutrition status of a household at time t
	— tevent: 		time in months until switch in status 
	— class:		assigned ward-resilience trajectory 

Note that the above calculations are rather data-intensive and were processed separately. Note further that for the data privacy reasons mentioned above, we had to separate household- from ward-level information. This makes it impossible to directly merge the ward-level resilience trajectories calculated in 1.2 with the household-level data we provide (without ward information). We therefore provide the class of each household here, i.e. the resilience trajectory class of each household as reported in the paper in household_all.csv. The class value simply corresponds to the resilience trajectory of the ward the household is located in. 

In addition, we include the following fixed household characteristics as background variables. 

	— gender household head (female, male)
	— education household head (true, false)
	— livelihood (pastoralist, other)
	— water source (safe, unsafe)

The data are provided in tabular form (household_all.csv). rules_coding_agg.txt provides a summary of the coding and aggregation rules applied.

List of files:
	rules_coding_agg.txt
	household_all.csv

List of related figures:
	Figure 2. Resilience trajectories per ward assigned using a latent mixed class mixed model (left) vs. average resilience for the period between 2016 and 2020 (right), with smaller values indicating lower resilience. Blue dots display the mean proportion of malnourished children [“Global acute malnutrition (GAM)” prevalence] relative to the population size per 	ward for the same period.
	Figure 3. Observed trajectories of ward resilience to acute malnutrition at monthly intervals. Mean trajectories derived from a four-class latent class mixed model are smoothed using a generalised additive model and are depicted including the 0.95 confidence interval (top), Kenya stressor intensity (bottom).
	Figure 4. Resilience trajectories per assigned latent class for Kenyan wards, with 0.95 confidence intervals.	Figure 5. Multivariate Cox regression results for household risk. Probabilities represent the risk of a household falling under the nutritional threshold at time t, as a function of the ward resilience trajectory. We control for a set of fixed household characteristics. N indicates the number of observations at the household/month level.